//
//  sellFootView.m
//  ShouYi
//
//  Created by yrapp on 16/3/11.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "sellFootView.h"

@implementation sellFootView

- (instancetype)initWithFrame:(CGRect)frame shangjia:(SEL)shangjia share:(SEL)share cancel:(SEL)cancel{
    self = [super initWithFrame:frame];
    if (self) {
 
        _shangjiaButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _shangjiaButton.frame = CGRectMake(0, 0, kWidth / 2, 44);
       [_shangjiaButton setTitle:@"直接上架" forState:(UIControlStateNormal)];
        _shangjiaButton.backgroundColor = [UIColor colorWithRed:251.0/255 green:151.0/255 blue:24.0/255 alpha:1];
        [_shareButton addTarget:self action:shangjia forControlEvents:(UIControlEventTouchUpInside)];
        [self addSubview:_shangjiaButton];
        
        _shareButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _shareButton.frame = CGRectMake(kWidth / 2, 0, kWidth / 2, 44);
        [_shareButton setTitle:@"分享" forState:(UIControlStateNormal)];
        _shareButton.backgroundColor = [UIColor colorWithRed:220.0/255 green:54.0/255 blue:40.0/255 alpha:1];
        [_shareButton addTarget:self action:share forControlEvents:(UIControlEventTouchUpInside)];
        [self addSubview:_shareButton];
        
        
        _cancelButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _cancelButton.frame = CGRectMake(0, 44, kWidth, 44);
        [_cancelButton addTarget:self action:cancel forControlEvents:(UIControlEventTouchUpInside)];
        _cancelButton.backgroundColor = [UIColor colorWithRed:232.0/255 green:234.0/255 blue:235.0/255 alpha:1];
        [_cancelButton setTitleColor:[UIColor grayColor] forState:(UIControlStateNormal)];
        [_cancelButton setTitle:@"取消" forState:(UIControlStateNormal)];
        [self addSubview:_cancelButton];
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
